package homeWorkDay05;

public class text2 {
    public static void main(String[] args) {
        //实例化两个任务
Runnable r =new show();
Runnable r1 =new show1();
//创建两个线程来执行任务
        Thread t =new Thread(r);
        Thread t1 =new Thread(r1);
        t.start();
        t1.start();

    }
}
//实现RUNNABLE接口
class show implements Runnable{
    public void run(){
        for (int i = 0; i < 1000; i++) {
            System.out.println("你勾八谁呀？");
        }
    }
}
class show1 implements  Runnable{
    @Override
    public void run() {
        for (int i = 0; i < 1000; i++) {
            System.out.println("You Father!");
        }
    }
}